home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr50 / angel19a.zip / ANGELIB.TXT < prev    next >
Text File  |  1993-05-18  |  109KB  |  3,433 lines

  1.                                     ANGELIB for BC7/PDS                        i                                    ___________________
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                 _|||||_  ||_  ||  _|||||_  |||||||  ||       ||  |||||||
  8.                 ||   ||  |||_ ||  ||   ||  ||       ||       ||  ||    ||
  9.                 ||   ||  ||||_||  ||       ||       ||       ||  ||    ||
  10.                 |||||||  || ||||  || ||||  |||||    ||       ||  |||||||
  11.                 ||   ||  || ||||  ||   ||  ||       ||       ||  ||    ||
  12.                 ||   ||  ||  |||  ||   ||  ||       ||       ||  ||    ||
  13.                 ||   ||  ||   ||   |||||   |||||||  |||||||  ||  |||||||
  14.  
  15.  
  16.  
  17.                                          CONTENTS
  18.  
  19.  
  20.  
  21.           I.    DISCLAIMER OF WARRANTY  . . . . . . . . . . . . . . . . . .    1
  22.  
  23.           II.   COPYRIGHT . . . . . . . . . . . . . . . . . . . . . . . . .    1
  24.  
  25.           III.  LICENSE . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  26.  
  27.           IV.   TECHNICAL SUPPORT (HOW TO REACH ME) . . . . . . . . . . . .    2
  28.                 Official Distribution Bulletin Boards . . . . . . . . . . .    2
  29.  
  30.           V.    INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . .    2
  31.  
  32.           VI.   NOTES ABOUT THIS RELEASE  . . . . . . . . . . . . . . . . .    3
  33.  
  34.           VII.  REGISTRATION  . . . . . . . . . . . . . . . . . . . . . . .    4
  35.                 A. How To Order . . . . . . . . . . . . . . . . . . . . . .    5
  36.                 B. Pricing  . . . . . . . . . . . . . . . . . . . . . . . .    5
  37.                 INVOICE & REGISTRATION  . . . . . . . . . . . . . . . . . .    9
  38.  
  39.           VIII. SYSTEM REQUIREMENTS . . . . . . . . . . . . . . . . . . . .   10
  40.  
  41.           IX.   FILES WHICH MAKE UP ANGELIB . . . . . . . . . . . . . . . .   10
  42.  
  43.           X.    USING ANGELIB . . . . . . . . . . . . . . . . . . . . . . .   11
  44.                 Creating a QLB (Quick Library)  . . . . . . . . . . . . . .   11
  45.  
  46.           XI.   REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . .   12
  47.  
  48.           XII.  USING PRINTER FUNCTIONS . . . . . . . . . . . . . . . . . .   49
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                     ANGELIB for BC7/PDS                        1                                    ___________________
  68.  
  69.  
  70.  
  71.  
  72.           I.    DISCLAIMER OF WARRANTY
  73.  
  74.                 I use the routines in ANGELIB almost every day as I write                                      _______
  75.           software and I am regularly adding, enhancing, or fixing.  My software
  76.           will never be "done," and I hope that it gets better and better.  In
  77.           any case, I can't guarantee that it's perfect; in fact, I'll guarantee
  78.           that it's not.  By using this software and documentation ("ANGELIB")
  79.           you must accept this disclaimer of warranty:
  80.  
  81.                 ANGELIB is provided "as is" without any warranties or                _______
  82.           conditions, expressed or implied, including, but not limited to, those
  83.           concerning merchantability and fitness for a particular purpose.  By
  84.           using ANGELIB, you are expressly releasing the author, Angel Babudro,                _______
  85.           from any liability resulting from the use of this software and
  86.           documentation.  You must assume the entire risk of using ANGELIB.                                                                   _______
  87.  
  88.  
  89.           II.   COPYRIGHT
  90.  
  91.                 The author retains the copyright for all ANGELIB source code,                                                         _______
  92.           documentation, assorted files, and all libraries.  However, once
  93.           provided with registration from the author you may distribute any
  94.           program you write with the benefit of ANGELIB, in compiled form only,                                                _______
  95.           without royalties to the author.  You must have written consent from
  96.           the author prior to distributing ANGELIB source code in part or in                                           _______
  97.           whole, whether modified or in original form.
  98.  
  99.  
  100.           III.  LICENSE
  101.  
  102.                 1.  ANGELIB is being distributed as Shareware.  This library is                    _______
  103.           not free, although license is hereby granted for evaluation of the
  104.           Unregistered Edition for an unlimited time.
  105.  
  106.                 2. You may keep as many backup copies of ANGELIB as you wish.                                                          _______
  107.           The Registered Edition is limited to simultaneous use on the number of
  108.           computers indicated by your registration level.  The Unregistered
  109.           Edition may be used on any number of computers.  You may share ANGELIB                                                                         _______
  110.           with others in complete and unmodified form.  REGISTERED USERS may NOT
  111.           distribute the files ending in OBJ.
  112.  
  113.                 3. You MUST NOT charge any fee or receive any consideration for
  114.           distributing the ANGELIB files and you MUST NOT include ANGELIB with
  115.           another business transaction (e.g., a hardware sale) unless you have
  116.           express written consent from the copyright holder, Angel Babudro.  You
  117.           MAY charge a fee of not more than US$6 (six dollars) for the disk
  118.           and/or service of distribution.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                                     ANGELIB for BC7/PDS                        2                                    ___________________
  134.  
  135.  
  136.  
  137.  
  138.           IV.   TECHNICAL SUPPORT (HOW TO REACH ME)
  139.  
  140.                 If my wording is unclear or can't find some topic in here, give
  141.           me a holler and help me fix it or add it to the manual.  A letter or
  142.           BBS message is preferred (and less expensive for you).  Phone calls
  143.           are fine between 9am and 5pm Eastern Time as long as you are a
  144.           registered user or intend to become one.  I thank you for your help in
  145.           making this library better.
  146.  
  147.                 Sysops please read SYSOP.DOC for special deals.  Shareware
  148.           vendors please see VENDOR.DOC for distribution information.
  149.  
  150.                 I can be reached via the mail or BBS.  The bulletin boards below
  151.           should always have current versions of all my software and I will get
  152.           any messages left there for me.
  153.  
  154.                 Mail        Angel Babudro, "Organic Computer Wizardry",
  155.                             28 Mulberry Street, Clinton, NY  13323-1506,
  156.                             (315) 853-1070 Mon-Fri 9am-5pm Eastern Time
  157.  
  158.                 Official Distribution Bulletin Boards
  159.  
  160.                 On bulletin boards I use the first name "Angelo" since it avoids
  161.           gender confusion.  I go by either name, anyhow.
  162.  
  163.           East Coast        Excalibur, Central NY (315) 736-3792 USR 14.4
  164.                             This is my local distribution board where you can
  165.                             always find the latest updates to all of my
  166.                             software.  I will get messages left here within a
  167.                             few days.  My software can be FREQed from this board
  168.                             via RBBS Net address A:954/401, FIDO Net address
  169.                             1:26501, or ICN Net 91:315/101.
  170.  
  171.           West Coast        Researcher's BBS, So Cal (805) 949-8151 USR DS
  172.                             This is my west coast distribution board which is
  173.                             updated every 2-3 weeks with the latest versions of
  174.                             all my software.  Leave messages for me in
  175.                             conference #136 (Organic Software).
  176.  
  177.                 My software can also be found on many of the nations larger
  178.           bulletin boards, such as Exec-PC and Channel 1.
  179.  
  180.  
  181.           V.    INTRODUCTION
  182.  
  183.                 ANGEL.QLB is a "high level" BC7 library for developing business
  184.           applications, especially data base uses.  These are the routines I use
  185.           in developing my apps (with some help from three other shareware
  186.           libraries, most notably John Strong's EZ-Windows which is terrific).
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                                     ANGELIB for BC7/PDS                        3                                    ___________________
  200.  
  201.  
  202.  
  203.  
  204.                 I put in the things that are simple but a pain to code every
  205.           time, like a "percent completed" bar graph in a window, and things
  206.           that are more complicated, such as a scrollable information window
  207.           with mouse support.  ANGELIB is written in BASIC.  Even though it's                               _______
  208.           not the "tightest" code of its kind I think you will find it very easy
  209.           to use.
  210.  
  211.                 Some of my routines trade flexibility for ease of use, like the
  212.           percentage graph which is always the same colour and at the same spot
  213.           on the screen.  This keeps things simple and provides built-in
  214.           consistency.  Just in case my ideas for standards aren't the same as
  215.           yours :) I have decided to offer the licensing of my source code.
  216.  
  217.                 Well, what more can I say?  I hope my library helps you to write
  218.           a bit better and faster.  If so maybe I'll see your registration in my
  219.           mail someday.
  220.  
  221.  
  222.           VI.   NOTES ABOUT THIS RELEASE
  223.  
  224.                 Every release fixes bugs found in previous releases and/or adds
  225.           a few new features.  Here are some notes about each release:
  226.  
  227.           1.9a  Routines updated: SayOk, ChooseFile$/ChooseFiles$
  228.  
  229.                 Parameters modified:  GetValidPath$, IsPath%
  230.  
  231.           1.9   Full LIB file is now included.  I was severly chastised by the
  232.                 dBASIC Toolkit BBS' sysop for distributing "crippled" software. 
  233.                 Sorry I never saw it that way before, and I find that I am in
  234.                 agreement.  Now you can compile to EXE form, but if you want to
  235.                 distribute and/or sell your software please register the
  236.                 library.
  237.  
  238.           1.8m  All printer & font routines have been updated to allow use on
  239.                 networks using DOS SHARE.
  240.  
  241.           1.8k  Routines updated: ErrScn, FileBackup, SelFont, SelFonts
  242.  
  243.                 Documentation corrected for HelpIndex
  244.  
  245.           1.8j  I slaps myself inna face & says, "What was I thinking?" as I
  246.                     notice that StrFmt's parameters are in reverse order
  247.                     compared to every other similar function in the known
  248.                     universe.  Oops.  Mask & source strings have been swapped.
  249.  
  250.                 Fixed: ChoosePtr% (problem if over 16 printers), Inform%
  251.                     (highlight problem)
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                                     ANGELIB for BC7/PDS                        4                                    ___________________
  266.  
  267.  
  268.  
  269.  
  270.                 Parameters modified: HelpIndex
  271.  
  272.                 Routines dropped: BackupMethod%, ChooseCountry% - These simple
  273.                     menus are easy to create with John Strong's EZ-Windows, so I
  274.                     took them out to save space.
  275.  
  276.                 Documentation corrected: I forgot to update the documentation
  277.                     for some routines.  Now you can actually use InputDate,
  278.                     FileBackup%, FileRestore%, FileRestores%, FmtFDD%
  279.  
  280.           1.8i  New routines: BarMenu%
  281.  
  282.           1.8h  New routines:
  283.                 ChooseFiles$ allows multiple file names to be chosen (whereas
  284.                     ChooseFile$ allows only one).
  285.                 FileRestores% allows single or multiple files to be selected
  286.                     from a back-up copy.
  287.                 GetFileNames$ allows more than one input file to be selected.
  288.                 OutDevs$ is identical to OutDev$ but is for use with these other
  289.                     new routines (which all use a common routine from John
  290.                     Strong's EZ-Windows library).
  291.                 GetFileDesc$ retrieves a file's long name from the DESCRIPT.*
  292.                     file
  293.  
  294.                 Renamed ToFDD% to FileBackup% and FromFDD% to FileRestore% - I
  295.                 think these names are easier to remember.
  296.  
  297.  
  298.           VII.  REGISTRATION
  299.  
  300.                 Although I hope that you are so happy with ANGELIB that                                                           _______
  301.           registering will be reward enough in itself, but I think it's more fun
  302.           & exciting to get something new.  ANGELIB is the library I use for                                            _______
  303.           developing all of my applications, so it is constantly updated.  Your
  304.           registered version will be an up-to-the-minute copy.  Other benefits
  305.           of registration that come to my mind include:
  306.  
  307.                 1.  You'll get OBJ files so you can create your own custom
  308.                     libraries.  I use the EZ-Windows and PBClone libraries for
  309.                     some routines (why re-invent the wheel?), so you will need
  310.                     to get them if you want to create custom libraries.  Buying
  311.                     all three libraries will cost around $70 which is far less
  312.                     than most commercial packages.
  313.                 2.  Within days you will get a library that would probably take
  314.                     so long to develop yourself that by the time you've done it
  315.                     you won't need it anymore
  316.                 3.  You can order a printed & bound manual for $8
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                                     ANGELIB for BC7/PDS                        5                                    ___________________
  332.  
  333.  
  334.  
  335.  
  336.                 4.  Technical support is possible! You can contact a real
  337.                     programmer who is 98% knowledgeable about the library
  338.                     (nobody's prefect) via mail, phone, or BBS
  339.                 5.  You'll have helped one of the little guys - someone who
  340.                     isn't a huge corporation.  (Thank you...)
  341.  
  342.                 A.  How To Order
  343.  
  344.                 U.S. customers please send cash, check, or money order. 
  345.           Canadian customers please send cash or Canadian International Money
  346.           Order (CIMO).  Customers in other countries please send U.S. funds
  347.           drawn on a U.S. bank.  If you send cash use a "security" no-see-
  348.           through envelope and you may want to send it via Registered mail, too.
  349.  
  350.                 If you prefer to use a credit card, you can order ANGELIB from                                                                  _______
  351.           Public (software) Library with your MC, Visa, AmEx, or Discover card
  352.           by calling 800-242-4PsL (from overseas: 713-524-6394) or by FAX to
  353.           713-524-6398 or by CompuServe to 71355,470.  THESE NUMBERS ARE FOR
  354.           ORDERING ONLY.  I CANNOT be reached at those numbers.  To contact me
  355.           for information about dealer pricing, volume discounts, site
  356.           licensing, the status of shipment of the product, the latest version
  357.           number, or for technical information, call 315-852-6942 or write me at
  358.           28 Mulberry Street, Clinton, NY USA 13323-1506.  Shareware is "try
  359.           before you buy" so please understand that product returns are not
  360.           allowed.
  361.  
  362.                 When ordering from PsL ask for product #10799 and please note
  363.           that PsL will add $3 for shipping & handling to U.S. as well as
  364.           Canadian orders.
  365.  
  366.                 B. Pricing
  367.  
  368.           Registration with Disk -- A single copy costs $25.  You will receive
  369.                 the latest version of ANGELIB in LIB (so it can be merged with                                      _______
  370.                 other libraries) and OBJ (to make custom libraries) formats. 
  371.                 You will also receive notification of major updates.  At this
  372.                 time, updates for registered users are $5 or send me a disk and
  373.                 return postage (I'll re-use your envelope).  See below for
  374.                 printed manuals.
  375.  
  376.           Multiple Copies -- Each copy may be used on a single computer at a
  377.                 time.  To ease the financial burden and thank you for being
  378.                 honest, you may apply the following discounts when ordering more
  379.                 than one copy:
  380.                 2 to 5 copies                                       40% discount
  381.                 Over 5 copies                                       50% discount
  382.  
  383.           Site License -- Register a single copy of ANGELIB and purchase a site                                                    _______
  384.                 license which allows you to make copies of the registered
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                                     ANGELIB for BC7/PDS                        6                                    ___________________
  398.  
  399.  
  400.  
  401.  
  402.                 version for use on more than one computer owned by the same
  403.                 business.  I would prefer that you order a registered copy and
  404.                 Site License for each physical location of the same business,
  405.                 but this is not required unless you would like to receive update
  406.                 notices at each location.
  407.                    Up to 4 computers                             $30.00 per site
  408.                    Up to 10 computers                            $70.00 per site
  409.                    Up to 20 computers                           $125.00 per site
  410.                    Any number of computers                      $400.00 per site
  411.  
  412.           Manuals -- I will print the latest version of the manual you are
  413.                 reading right now (using Ventura Publisher and a laser printer)
  414.                 and bind it.  I am offering this as a service to those who want
  415.                 a printed, bound manual with their software.  Most of the cost
  416.                 involved here is for materials and extra shipping costs. 
  417.                 Remember that ASCII and WP documentation files are always on
  418.                 disk and if you provide your printer model on the registration
  419.                 form I will send you a file ready to print on your printer.
  420.                 -  One copy                                                $8.00
  421.                 -  Two or more copies                             $6.00 per copy
  422.  
  423.           Source Code License - You may license the use of the source code for
  424.                 ANGELIB for just $30.  Thereafter, updates will be available for                _______
  425.                 $5 plus shipping.  Please note that I call routines from EZ-
  426.                 Windows (by John Strong) and PBClone (by Tom Hanlin) in my
  427.                 library (why re-invent their wheels?), so you will need to
  428.                 register one or both of these to use some OBJs in creating
  429.                 custom libraries.  I recommend both of them highly and will
  430.                 gladly share unregistered versions of these with you - just ask.
  431.  
  432.           Complimentary Registered Editions - I would like to give you a
  433.                 complimentary registration if you will give me a bit of
  434.                 marketing assistance:
  435.  
  436.                 1. Write a review of my software and post it on a bulletin
  437.                    board, send me a copy of it showing the BBS's header and the
  438.                    name and phone number of the BBS.  Just give me your honest
  439.                    praise and criticism in a decent review.  Your review will be
  440.                    most helpful to me if it mentions your best & worst-liked
  441.                    features and any ideas you have for improvement.  This will
  442.                    help me decide the future of ANGELIB and for that help I will                                                _______
  443.                    send you a complimentary registered disk.
  444.  
  445.                 2. It helps me to know which BBSs carry my software and the more
  446.                    the better, of course!  If you will upload a package to at
  447.                    least five public ("open") BBSs, send me their names and
  448.                    phone numbers and I'll send you a complimentary registered
  449.                    disk.  I would appreciate you uploading to time-share
  450.                    systems, private ("closed") BBSs, or part-time BBS, but
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                                     ANGELIB for BC7/PDS                        7                                    ___________________
  464.  
  465.  
  466.  
  467.  
  468.                    please do not use these to apply for a complimentary
  469.                    registered edition.  BTW: I use an HST 14.4 modem so it would
  470.                    be best if you provided me with BBSs which also use HSTs so I
  471.                    can hook-up at high speed.
  472.  
  473.                 3. If you are a consultant or other type of computer
  474.                    professional and your recommendation leads to one or more of
  475.                    your clients purchasing one of my packages, just send me a
  476.                    note with your client's registration or have them mention
  477.                    your name when they register.  I will send a complimentary
  478.                    registered edition or an update for every registration you
  479.                    get for me.  This is in lieu of a multiple copy discount; I
  480.                    intend it for consultants who choose not to deal with sales
  481.                    tax.
  482.  
  483.                 One complimentary registration per person or company.  A
  484.           complimentary registration is just like a paid one - you can upgrade
  485.           it with a site license, purchase manuals, etc.  It helps when you send
  486.           back disks to be re-used - even the envelopes can be re-used.  When
  487.           you order a complimentary registration please fill in the appropriate
  488.           blanks below PLUS the Invoice so I know what size disk you need, and
  489.           please send me a couple of dollar bills for shipping expenses. 
  490.           Thanks.
  491.  
  492.                 I will promise these complimentary offers until at least
  493.           12/31/93 - after that date please check with me first.
  494.  
  495.  
  496.  
  497.                           COMPLIMENTARY REGISTRATION APPLICATION
  498.                                   Use until Dec. 31, 1993
  499.  
  500.  
  501.                                                              Date_______________
  502.  
  503.                 Please also fill in the Invoice on the following page (put $0
  504.           for the disk).  Include $2.00 for shipping within the U.S. or the
  505.           amount indicated for addresses outside the U.S.  Remember to order
  506.           printed manual(s) if you so desire.
  507.  
  508.  
  509.           (__) Review posted on (BBS name & number)________________________
  510.                 Include a copy of the review, please. Thank you very much!
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                                     ANGELIB for BC7/PDS                        8                                    ___________________
  530.  
  531.  
  532.  
  533.  
  534.           (__) I uploaded (archive name, like ANGEL18E.ARJ)__________________
  535.                 to these five 24-hour public ("open") BBSs:
  536.  
  537.              BBS Name              Phone Number/Modem Type  Sysop Name             ________              _______________________  __________
  538.  
  539.           1_______________________ ________________________ _______________
  540.           2_______________________ ________________________ _______________
  541.           3_______________________ ________________________ _______________
  542.           4_______________________ ________________________ _______________
  543.           5_______________________ ________________________ _______________
  544.  
  545.              These offers subject to withdrawal or change at any time without
  546.           notice.  All prices are subject to change without notice.  Bulletin
  547.           Board Sysops please see the file SYSOP.DOC for special pricing and
  548.           information; vendors & sysops please see VENDOR.DOC.
  549.  
  550.                         Angel Babudro - "Organic Computer Wizardry"
  551.                         28 Mulberry Street   Clinton, NY 13323-1506
  552.                         (315) 853-6942 Mon-Fri 9am-5pm Eastern Time
  553.                (home phone; remember we're 3 hours later than Pacific coast)
  554.  
  555.                           Please register the Shareware you keep.
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.                                     ANGELIB for BC7/PDS                        9                                    ___________________
  596.  
  597.  
  598.  
  599.  
  600.                                                           INVOICE & REGISTRATION
  601.                                      Credit card orders see "How To Order" above
  602.  
  603.           Your Name_____________________________________________________________
  604.  
  605.           Company Name__________________________________________________________
  606.  
  607.           Address_______________________________________________________________
  608.  
  609.           ______________________________________________________________________
  610.  
  611.           City___________________________ State/Prov________ Zip________________
  612.  
  613.           Registration     Registration & disk: $25 x qty _____        $_______ 
  614.  
  615.           Source Code      Source disk & license: $30 x qty _____       _______ 
  616.  
  617.           Multiple/        2-4 disks -- deduct 40%
  618.           Wholesale        5 or more -- deduct 50%                     (_______)
  619.  
  620.           Site License     Up to 4 CPUs add $30; Up to 10 add $70
  621.           (add to above)   Up to 20 add $125; Unlimited add $400        _______ 
  622.  
  623.           Printed          One copy is $8, 2 or more are $6 each
  624.           Manuals          Qty _____ x $_____ each                      _______ 
  625.  
  626.           Shipping &       Canada, AK, HI, VI, PR add $3 extra          _______ 
  627.            Expenses        Other countries add $9 per copy              _______ 
  628.  
  629.                            ** T O T A L **                              _______ 
  630.  
  631.  
  632.           Disk size & quantity   [__] 3½"                   [__] 5¼"
  633.           Drive density          [__] Low (DD) required     [__] High (HD) okay
  634.           Extended densities     [__] FDFORMAT extended densities okay
  635.  
  636.           Which version are you using now?_____________________________________
  637.  
  638.           Where did you get it?________________________________________________
  639.  
  640.  
  641.           ANGELIB has been delivered to and accepted by customer.  Upon receipt          _______
  642.           of this paid invoice the latest Registered Edition disk and any
  643.           options chosen above will be sent.  Send U.S. funds or CIMO.  NYS
  644.           orders add local sales tax.  Mail this page with your cash (use
  645.           Registered mail), cheque or money order to Angel Babudro, 28 Mulberry
  646.           Street, Clinton, NY USA 13323-1506. Please allow 1-3 weeks. Thank you!
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.                                     ANGELIB for BC7/PDS                       10                                    ___________________
  662.  
  663.  
  664.  
  665.  
  666.           VIII. SYSTEM REQUIREMENTS
  667.  
  668.                 All you need is PC/MS-DOS 3.3 or later, PDS/BC 7.1, and a
  669.           computer.  You will need 200k to 500k of disk space for the files,
  670.           depending on which ones you decide to keep around.
  671.  
  672.  
  673.           IX.   FILES WHICH MAKE UP ANGELIB
  674.  
  675.                 The unregistered edition is made up of the following files:
  676.  
  677.                 ANGEL.LIB     The linker library to make EXE files (check
  678.                               MAKEQLB.BAT for help making a Quick Library)
  679.                 ANGEL.BI      The include file, function & subroutine
  680.                               definitions
  681.                 COLOURS.BI    Colour codes definitions, use is optional
  682.                 FKEYS.BI      Function key definitions, use is optional
  683.                 ANGEL.TXT     The ASCII text file of this document
  684.                 ANGEL.WP      The WordPerfect file of this document (so you can
  685.                               format it for your printer)
  686.                 QSORT.BAS     Source code to this public domain routine
  687.                 FKEY.LST      Sample file for use with FKEYS routine
  688.                 READ.ME       A file containing late-breaking news...  May or
  689.                               may not be part of the package you get
  690.                 ORDER.FRM     Order form for all of my software
  691.                 SYSOP.DOC     Sysop information
  692.                 VENDOR.DOC    Disk vendors & Sysops: pricing, detailed
  693.                               description, and distribution information
  694.                 COMPARE.EXE   A byte-by-byte file compare utility.  Displays in
  695.                               hex, decimal, and ASCII. Type COMPARE for help.
  696.                 DUMP.EXE      Hex/octal/decimal file viewer. Type DUMP for help.
  697.  
  698.                 The registered edition also includes:
  699.  
  700.                 FAROBJ.EXE    Object modules for creating custom libraries
  701.                               (self-extracting archive)
  702.                 MLIB.BAT      Sample batch file for creating custom libraries
  703.                               from OBJ modules.  I use it all the time to re-
  704.                               compile libraries during software development. 
  705.                               Allows OBJs to be anywhere you like rather than
  706.                               all in one directory
  707.                 MLIB.LSP      Sample specification file for MLIB.BAT
  708.                 ANGEL.INF     Object module information file for use with Tom
  709.                               Hanlin's LIBWIZ utility - this makes it MUCH
  710.                               easier to create your own custom libraries if
  711.                               you've never done it before.
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.                                     ANGELIB for BC7/PDS                       11                                    ___________________
  728.  
  729.  
  730.  
  731.  
  732.           X.    USING ANGELIB
  733.  
  734.                 Basically, just put the files wherever you want them and use the
  735.           INCLUDE meta-command to place the .BI definition files in your
  736.           programme (e.g., '$INCLUDE: 'Angel.bi' and '$INCLUDE: 'PtrRec.def'). 
  737.           Using the $INCLUDE file lets you call subroutines without the CALL key
  738.           word.
  739.  
  740.                 Creating a QLB (Quick Library)
  741.  
  742.                 If you want to use ANGEL.LIB routines in the QBX interactive
  743.           environment you need to make a file called ANGEL.QLB first.  To do
  744.           this just use the command:
  745.  
  746.                 link /qu angel.lib,angel.qlb,nul,qbxqlb;
  747.  
  748.                 If you get "Bad command or file name" you will need to supply
  749.           the drive and path containing the file LINK.EXE.
  750.  
  751.                 When you start QBX just use "QBX /L d:\path\ANGEL" (replacing
  752.           d:\path with your drive and pathname) - this will load the quick
  753.           library into memory so you can run the routines.  Please note that
  754.           it's a large library; if you have extended memory QBX will load some
  755.           of the library "high."  If you run out of memory with a large
  756.           programme I can only console you with the fact that most of my
  757.           software is too large to run in the QBX environment and the Microsoft
  758.           help-line wasn't even able to help me.
  759.  
  760.                 Rather than write a probably-lame demonstration programme to
  761.           show off ANGELIB's functions, I would like to suggest that you check                   _______
  762.           out my shareware from whence this library sprang:  What Mailing List?
  763.           (WML), What Vehicle History? (WVH), What Job Summary? (WJS), What
  764.           Floppy Format? (WFF), and What Tape Back-up (WTB).
  765.  
  766.                 Registered Edition users have individual OBJ files which can be
  767.           combined into custom libraries, even adding OBJs from other libraries
  768.           (such as EZ-Windows) or your own routines.  I find it easiest to make
  769.           a file, using an ASCII editor, which contains all of the names of the
  770.           OBJs I want in the library (see MLIB.LSP for a sample).  This file
  771.           contains one routine per line, preceded by a "+" and ending with a "&"
  772.           (which is what LIB requires since this file is passed directly to
  773.           LIB.EXE).  This makes it easy to recompile the library if you changed
  774.           some code or want to add or delete routines.
  775.  
  776.                 Another alternative for making your own libraries is to use Tom
  777.           Hanlin's LIBWIZ utility.  This makes things very easy since LIBWIZ is
  778.           smart enough to figure out if a routine requires others (for example,
  779.           the INFORM%() function requires several other routines) and will
  780.           include those other routines automatically.  The drawback to LIBWIZ is
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.                                     ANGELIB for BC7/PDS                       12                                    ___________________
  794.  
  795.  
  796.  
  797.  
  798.           that it has no "save" feature so you have to select each module every
  799.           time (which can get a bit tedious if you have 50 modules or so).  If
  800.           you've never tried LIBWIZ you ought to at least check it out.  The
  801.           most current version I know of is LIBWIZ13.  To use it just enter
  802.           LIBWIZ ANGEL mylibname (where "mylibname" is your library's name).
  803.  
  804.  
  805.           XI.   REFERENCE
  806.  
  807.                 ANGELIB is made up of functions and subroutines.  Functions                _______
  808.           return a value to a variable - e.g., a% = CalcAttr(White, Blue) puts a
  809.           value in a% - whereas subroutines do not - e.g., BackUpMsg just prints
  810.           a message on the screen.
  811.  
  812.                 The general syntax of a function call is
  813.           var = Function(param1,param2,etc).  For a subroutine, the "formal"          _________________________________
  814.           syntax is "[CALL] subname(param1, param2, etc.)" although "CALL" is                     ____________________________________
  815.           not needed when you include ANGEL.BI in your code.
  816.  
  817.                 Subroutines do not yield any "result," but they often modify one
  818.           or more variables which are passed to them.  DBFHeader is a good
  819.           example of this.
  820.  
  821.                 The routines below each show their name at the left margin and a
  822.           sample calling sequence aligned with the right margin, under which is
  823.           the english explanation of the routine's purpose followed by the
  824.           definition of variables.
  825.  
  826.  
  827.           BackupMsg                                                    BackupMsg
  828.             Prints  what I think of  as a pseudo-subliminal reminder to back-up
  829.             your data  :)  A little reminder pops  onto the screen for a second
  830.             then the screen is cleared.
  831.  
  832.             Pass            ____
  833.                  Nothing
  834.  
  835.             Returns            _______
  836.                  Nothing
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.                                     ANGELIB for BC7/PDS                       13                                    ___________________
  860.  
  861.  
  862.  
  863.  
  864.           BarMenu%    opt% = BarMenu%(r%,c%,norm%,rev%,opts$(),seed%,getit%,ms%)
  865.             Displays  a horizontal bar menu and  waits for user's choice of the
  866.             options.
  867.  
  868.             Pass            ____
  869.                  r%/c%       Row and column at which to begin displaying
  870.  
  871.                  norm%/rev%  Normal   &   reverse   display   attributes   (via
  872.                              CalcAttr%)
  873.  
  874.                  opts$()     String array containing choices
  875.  
  876.                  seed%       Option  number  to  highlight initially  (normally
  877.                              "1")
  878.  
  879.                  getit%      Flag to  get user's input:   If true routine waits
  880.                              for user  to select an option or press an extended
  881.                              key (e.g., an arrow,  PgUp, etc.) or ENTER or Esc.
  882.                              If  False,  the  routine  displays the  menu  then
  883.                              exits (which is  useful for displaying a bunch  of
  884.                              horizontal menus on a setup screen, for example).
  885.  
  886.                  ms%         Mouse support (0=no, non-zero=yes)
  887.  
  888.             Returns            _______
  889.                  Function    If getit%  is true, the  user's final keypress  is
  890.                              returned - ENTER  (13), Esc (27), or extended  key
  891.                              code (2nd byte of code).  If getit% is false  then
  892.                              the returned value is irrelevant.
  893.  
  894.                  seed%       The number of the highlighted item, numbered  from
  895.                              left to right starting with one.
  896.  
  897.  
  898.  
  899.  
  900.           CalcAttr%                             attr% = CalcAttr% (Fore%, Back%)
  901.             For use with routines that need a single integer colour code.
  902.  
  903.             Pass            ____
  904.                  Fore%       Foreground colour code
  905.  
  906.                  Back%       Background colour code
  907.  
  908.             Returns            _______
  909.                  Fore% + (Back% * 16)
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.                                     ANGELIB for BC7/PDS                       14                                    ___________________
  926.  
  927.  
  928.  
  929.  
  930.           ChooseFD$                                             fdd$ = ChooseFD$
  931.             This is a menu of available floppy disk drives.  The function:
  932.  
  933.             1.   Checks the number of floppy disk drives
  934.  
  935.             2.   If there is only one drive then "A:" is returned, otherwise
  936.  
  937.             3.   A pop-up  menu of  floppy drives is  presented from  which the
  938.                  user may choose one or press Esc.
  939.  
  940.             Pass            ____
  941.                  Nothing
  942.  
  943.             Returns            _______
  944.                  Floppy disk  drive  letter followed  by a  colon, or  a  blank
  945.                  string if user presses Esc.
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.                                     ANGELIB for BC7/PDS                       15                                    ___________________
  992.  
  993.  
  994.  
  995.  
  996.           ChooseFile$         File$ = ChooseFile$(FSpec$,Exclude$,ExtInfo%,ms%))
  997.             Presents  a  scrollable  list  of files  in  a  window which  match
  998.             FileSpec$ (excluding Exclude$) and waits for user to choose one.
  999.  
  1000.             Pass            ____
  1001.                  FSpec$      File specification  to include in  the list.   May
  1002.                              include drive  and path name,  if necessary.   For
  1003.                              example, "*.DAT" or "C:\DATA\*.DAT" are valid.
  1004.  
  1005.                  Exclude$    File   specification  to  exclude  from  the  list
  1006.                              (e.g., "*.bak").   Do  not put a drive  or path in
  1007.                              this.
  1008.  
  1009.                  ExtInfo%    Extended   Information   flag   &   record   size.
  1010.                              Controls  display  of  extended information  (file
  1011.                              size &  long description).   Set this variable  to
  1012.                              zero  for no  extra file  information,  or to  the
  1013.                              record size to show the number  of records in  the
  1014.                              file  along with description (if a file DESCRIPT.*
  1015.                              is  in  the directory  it  will be  used for  file
  1016.                              descriptions).    To  show size  in  bytes  use  a
  1017.                              record size of one.  If  negative information will
  1018.                              be  in  DOS  Name/Size/Description   order.     If
  1019.                              positive  Description/Name/Size   order  will   be
  1020.                              displayed.
  1021.  
  1022.                  ms%         Mouse support flag (true/false).
  1023.  
  1024.             Returns            _______
  1025.                  File name  chosen without  drive or path, or  null string ("")                                   _______
  1026.                  if user presses Esc
  1027.  
  1028.             Notes            _____
  1029.                  If ExtInfo%  is non-zero,  font files *.SFP and  *.SFL will be
  1030.             shown with  their font  names and  other files  will be shown  with
  1031.             their size & any description.
  1032.                  I  patterned the  format of  the DESCRIPT.*  file after  4DOS:
  1033.             file name  followed by  a space  and up  to 40  characters for  the
  1034.             description.  4DOS makes a hidden file, however.  ChooseFile$  will
  1035.             only  read "normal" (not  hidden) files right now.   I'll soon have
  1036.             it so ChooseFile$ will read hidden files, too.
  1037.                  ChooseFile$()  uses the  EZ-Windows  routine ScrlMenu  and the
  1038.             PBClone routines ScrSave & ScrRest.
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.                                     ANGELIB for BC7/PDS                       16                                    ___________________
  1058.  
  1059.  
  1060.  
  1061.  
  1062.           ChooseFileS$             F$ = ChooseFileS$(Inc$,Exc$,Info%,many%,ms%))
  1063.             Shows a scrollable  list of files in a  window which match Inc$ and
  1064.             excluding Exc$ then waits for user to choose one or more.
  1065.  
  1066.             Pass            ____
  1067.                  Inc$        File specification  to include in  the list.   May
  1068.                              include drive  and path name,  if necessary.   For
  1069.                              example, "*.DAT" or "C:\DATA\*.DAT" are valid.
  1070.  
  1071.                  Exc$        File   specification  to  exclude  from  the  list
  1072.                              (e.g., "*.bak").   Do  not put a drive  or path in
  1073.                              this.
  1074.  
  1075.                  Info%       Extended   Information   flag   &   record   size.
  1076.                              Controls  display  of  extended information  (file
  1077.                              size &  long description).   Set this variable  to
  1078.                              zero  for no  extra file  information,  or to  the
  1079.                              record size to show the number  of records in  the
  1080.                              file  along with description (if a file DESCRIPT.*
  1081.                              is  in  the directory  it  will be  used for  file
  1082.                              descriptions).    To  show size  in  bytes  use  a
  1083.                              record size of one.  If  negative information will
  1084.                              be  in  DOS  Name/Size/Description   order.     If
  1085.                              positive  Description/Name/Size   order  will   be
  1086.                              displayed.
  1087.  
  1088.                  many%       True=Allow multiple picks, False=Just one
  1089.  
  1090.                  ms%         Mouse support flag (true/false).
  1091.  
  1092.             Returns            _______
  1093.                  File names without drive or  path, or null string ("") if user                            _______
  1094.                  presses Esc. Names are padded to length of 12.
  1095.  
  1096.             Notes            _____
  1097.                  This  routine ends  up  about  10k larger  than  ChooseFile$()
  1098.             since it requires  an EZ-Windows routine (ScrlTag) which the  other
  1099.             routine does not.  If your  programme already uses ScrlTag you will
  1100.             only see a slight increase in your programme size  (about .5k) over
  1101.             using ChooseFile$().  See ChooseFile$() for other notes.
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.                                     ANGELIB for BC7/PDS                       17                                    ___________________
  1124.  
  1125.  
  1126.  
  1127.  
  1128.           ChoosePort%                      PtrPort% = ChoosePort%(default%, ms%)
  1129.             Presents a pop-up menu of printer ports (LPT1, LPT2, and LPT3)  and
  1130.             waits for user to pick one or press Esc.
  1131.  
  1132.             Pass            ____
  1133.                  default%    Default (current) printer port setting (1-3).
  1134.  
  1135.                  ms%         Mouse support available: 0 = No, 1 = Yes
  1136.  
  1137.             Returns            _______
  1138.                  Port number (1-3) or zero if user presses Esc
  1139.  
  1140.  
  1141.  
  1142.  
  1143.           ChoosePtr%      Ok% = ChoosePtr%(pType$, path$, PtrNo%, PtrPort%, ms%)
  1144.             Presents a  pop-up menu  of  printer choices  from the  PRINTER.DAT
  1145.             file.   If there are less than 15 choices (that is, all choices fit
  1146.             inside the window), then the default (PtrNo%) will be highlighted.
  1147.  
  1148.             Pass            ____
  1149.                  pType$      Printer types to include in the menu:
  1150.                              D = Dot matrix printers
  1151.                              L = Laser printers
  1152.                              B = Both
  1153.  
  1154.                  path$       File  specification  for  PRINTER.DAT file.  path$
  1155.                              may contain a  drive, path, and/or file name.   If
  1156.                              no  file name  is given, PRINTER.DAT is  used.  If
  1157.                              no  drive &  path are  given, the  current drive &
  1158.                              path are used.
  1159.  
  1160.                  PtrNo%      Record  number  of  currently  chosen  printer  in
  1161.                              PRINTER.DAT
  1162.  
  1163.                  ms%         0 = Keyboard only
  1164.                              1 = Use mouse, too
  1165.  
  1166.             Returns            _______
  1167.                  pType$      Changed  to "D"  if dot  matrix  chosen or  "L" if
  1168.                              laser printer chosen
  1169.  
  1170.                  PtrNo%      PRINTER.DAT record number for the chosen printer
  1171.  
  1172.                  PtrPort%    The port number selected for the  printer (LPT1 is
  1173.                              1, LPT2 is 2, etc.) or zero if user presses Esc
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.                                     ANGELIB for BC7/PDS                       18                                    ___________________
  1190.  
  1191.  
  1192.  
  1193.  
  1194.           ContCan%                                                 i% = ContCan%
  1195.             Displays  "Continue" and "Cancel" keys  at the bottom of the screen
  1196.             and waits for response.
  1197.  
  1198.             Pass            ____
  1199.                  Nothing
  1200.  
  1201.             Returns            _______
  1202.                  TRUE (-1) if user presses Esc
  1203.                  FALSE (0) if user presses Return (aka Enter)
  1204.  
  1205.  
  1206.  
  1207.  
  1208.           DateFmt$                  FormattedDate$ = DateFmt$(d%, m%, y%, intl%)
  1209.             I use this routine to print  the formatted date after getting input
  1210.             from  the user.   You  can  "PRINT DateFmt$()" or  assign it  to  a
  1211.             variable.  Use the ChooseCountry% menu to let the user set Intl%.
  1212.  
  1213.             Pass            ____
  1214.                  d%          Day on the month
  1215.                  m%          Month number
  1216.                  y%          Year (4-digits)
  1217.                  Intl%       International formatting
  1218.                              1 = USA (mm/dd/yyyy)
  1219.                              2 = Canadian (dd-mm-yyyy)
  1220.                              3 = USA & Cdn (dd MoName yyyy)
  1221.                              4 = International (dd MoName yyyy)
  1222.  
  1223.             Returns            _______
  1224.                  Formatted date
  1225.  
  1226.  
  1227.  
  1228.  
  1229.           DateVal%                                      dv% = DateVal%(TheDate$)
  1230.             Converts  dates from 1992  to 2078  to an  integer number  for date
  1231.             calculations.   For  example,  DateVal%(Date1$)  - DateVal%(Date2$)
  1232.             would give  you the number  of days between the  two dates.   Years
  1233.             prior to 1992 are converted to 1992.
  1234.  
  1235.             Pass            ____
  1236.                  TheDate$    Date formatted the same as BASIC's DATE$ function
  1237.  
  1238.             Returns            _______
  1239.                  Integer value based on the date
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.                                     ANGELIB for BC7/PDS                       19                                    ___________________
  1256.  
  1257.  
  1258.  
  1259.  
  1260.           DBFHeader             DBFHeader file$, Fld$(), reclen%, recs&, NoFlds%
  1261.             Opens  .DBF  file FileName$  and returns  field names  in Field$(),
  1262.             record length in  reclen%, number of records in  the file in recs&,
  1263.             and number  of fields in NoFields%.   You can  then call DBFPickFld
  1264.             to pick fields from the list.  See also DBFPickFld function.
  1265.  
  1266.             Pass            ____
  1267.                  file$       The DBF  file name, including  drive and path,  if
  1268.                              necessary
  1269.  
  1270.                  Fld$()      This array  must be initialized  prior to  calling
  1271.                              DBFHeader  to  the  maximum  number of  fields  (I
  1272.                              would suggest  setting it to  at least 50,  unless
  1273.                              you know better).
  1274.  
  1275.             Returns            _______
  1276.                  Fld$()      The names of the fields.  The first field name  is
  1277.                              in Field$(1), etc.
  1278.  
  1279.                  reclen%     The file's record length
  1280.  
  1281.                  recs&       The number of records on file
  1282.  
  1283.                  NoFlds%     The number of fields
  1284.  
  1285.  
  1286.  
  1287.  
  1288.           DBFPickFld%                 fld% = DBFPickFld%(iRow%, iCol%, field$())
  1289.             Presents the list  of field names of a  .DBF file at and waits  for
  1290.             user  to select one.   See also DBFHeader  which will fill field$()
  1291.             with field names.
  1292.  
  1293.                  iRow%       Top row of window
  1294.  
  1295.                  iCol%       Left column of window
  1296.  
  1297.                  field$()    Array containing field names from which to choose
  1298.  
  1299.                  ms%         Mouse flag: 0 = no mouse, non-zero = use mouse
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                                     ANGELIB for BC7/PDS                       20                                    ___________________
  1322.  
  1323.  
  1324.  
  1325.  
  1326.           DBFShowFields       DBFShowFields row%, col%, show%, field$(), hilite%
  1327.             Displays a  window filled  with field names  found in  the field$()
  1328.             variable (which  can be  set via DBFHeader).   Field number hilite%
  1329.             will  be highlighted and  placed in  the centre  of the  window (if
  1330.             possible).
  1331.  
  1332.             Pass            ____
  1333.                  row%        Top screen row of window (box corner)
  1334.                  col%        Top left corner of window
  1335.                  show%       Number of fields to show in the window
  1336.  
  1337.                  field$()    A  2-dimensional  array  field$(1-fieldnum,  0-2).
  1338.                              field$(fieldnum,0) is the field name
  1339.                              field$(fieldnum,1) is the field type
  1340.                              field$(fieldnum,2) is the field length
  1341.  
  1342.                              All you  need to do is dimension field$() and then
  1343.                              pass it to DBFHeader which will  fill it with  the
  1344.                              field specs.
  1345.  
  1346.                              Note:  DBFHeader sets  field$(1,x) to  "None"  and
  1347.                              this routine  also expects  field$(1,x) to be  the
  1348.                              "None" field.
  1349.  
  1350.                  hilite%     Indicates  the field  number to  highlight  on the
  1351.                              screen (a value of zero highlights  nothing).  The
  1352.                              first field  in the  window is  Max%(1,hilite%-5),
  1353.                              so if  hilite%=1,2,3,4, or  5 the  first field  in
  1354.                              the window is #1; if hilite%=6 the first  field is
  1355.                              #2, etc.
  1356.  
  1357.             Returns            _______
  1358.                  Nothing
  1359.  
  1360.  
  1361.  
  1362.  
  1363.           Delay                                                       Delay Sec!
  1364.             Delays for Sec! seconds.  I use this for copyright messages, etc.
  1365.  
  1366.             Pass            ____
  1367.                  Sec!        Number of seconds to delay (floating point)
  1368.  
  1369.             Returns            _______
  1370.                  Nothing
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.                                     ANGELIB for BC7/PDS                       21                                    ___________________
  1388.  
  1389.  
  1390.  
  1391.  
  1392.           DrawFDD                                   DrawFDD Light%, iRow%, iCol%
  1393.             Draws a text picture of a floppy on the screen at iRow%,iCol%.   If
  1394.             Light% is  TRUE (-1)  then the  light blinks  red (bright  white on
  1395.             mono monitors), else it is white.
  1396.  
  1397.             Pass            ____
  1398.                  Light%      True if drive "light" is to blink, false if not
  1399.  
  1400.                  iRow%       Top row of picture
  1401.  
  1402.                  iCol%       Left column of picture
  1403.  
  1404.             Returns            _______
  1405.                  Nothing
  1406.  
  1407.  
  1408.  
  1409.  
  1410.           DrawHDD                             DrawHDD Light%, iRow%, iCol%, Msg$
  1411.             Similar  to DrawFDD but  draws a  text picture  of a hard  disk and
  1412.             places the current drive (CURDRIVE) letter in the box.
  1413.  
  1414.             Pass            ____
  1415.                  Light%      True if drive "light" is to blink, else false
  1416.  
  1417.                  iRow%       Top row of picture
  1418.  
  1419.                  iCol%       Left column of picture
  1420.  
  1421.                  Msg$        A  message up  to 20  characters  long to  display
  1422.                              inside the  picture.  If  longer than  20 chars it
  1423.                              will be truncated.
  1424.  
  1425.             Returns            _______
  1426.                  Nothing
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.                                     ANGELIB for BC7/PDS                       22                                    ___________________
  1454.  
  1455.  
  1456.  
  1457.  
  1458.           DrvSpace                         DrvSpace (Drive$, Total&, Free&, EC%)
  1459.             Returns total space and free space (in bytes) of drive Drive$.
  1460.  
  1461.             Pass            ____
  1462.                  Drive$      Disk drive letter (e.g., "C")
  1463.  
  1464.             Returns            _______
  1465.                  Total&      Total bytes are returned in this variable
  1466.  
  1467.                  Free&       Free bytes are returned in this variable
  1468.  
  1469.                  EC%         DOS error  code is  returned in  this variable  or
  1470.                              zero if no error
  1471.  
  1472.  
  1473.  
  1474.  
  1475.           ElapsedTime         ElapsedTime STime$, ETime$, Hour%, Minutes%, Secs%
  1476.             Calculates elapsed time.
  1477.  
  1478.             Pass            ____
  1479.                  STime$      Starting  time  hh:mm:ss  (same  format  as  TIME$
  1480.                              function)
  1481.  
  1482.                  ETime$      Ending  time   hh:mm:ss  (same   format  as  TIME$
  1483.                              function)
  1484.  
  1485.             Returns            _______
  1486.                  ETime$      Formatted elapsed time (hh:mm:ss)
  1487.                  Hour%       Elapsed hours
  1488.                  Minutes%    Elapsed minutes
  1489.                  Secs%       Elapsed seconds
  1490.  
  1491.             Example            _______
  1492.                  S$ = TIME$              'Starting time
  1493.                  (do whatever needs to be done)
  1494.                  E$ = TIME$              'Ending time
  1495.                  ElapsedTime S$, E$, H%, M%, S%
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.                                     ANGELIB for BC7/PDS                       23                                    ___________________
  1520.  
  1521.  
  1522.  
  1523.  
  1524.           ErrScn                                        ErrScn ErrCode%, Module$
  1525.             Presents  an  error  screen showing  error  number,  english  text,
  1526.             possible solution, and module name.
  1527.  
  1528.             Pass            ____
  1529.                  ErrCode%    Error number
  1530.  
  1531.                  Module$     Module name
  1532.  
  1533.             Returns            _______
  1534.                  Nothing
  1535.  
  1536.  
  1537.  
  1538.  
  1539.           ErrSolve$                                            ErrSolve$ Number%
  1540.             Prints  possible  solution  to  error  number  Number%.    Used  by
  1541.             subroutine ErrScn.   Not  very extensive (to  save memory),  but it
  1542.             sure beats no error handling...
  1543.  
  1544.  
  1545.  
  1546.  
  1547.           ErrText$                                              ErrText$ Number%
  1548.             Prints text of error Number%.  Used by ErrScn.
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.                                     ANGELIB for BC7/PDS                       24                                    ___________________
  1586.  
  1587.  
  1588.  
  1589.  
  1590.           FileBackup%                      ec% = FileBackup%(FileMask$, Method%)
  1591.             Asks for  user to  enter path (including  drive) on which  to store
  1592.             the   back-up  (e.g.,  "A:\"   or  "\TEMP\BACKUPS")  then  backs-up
  1593.             FileMask$ to drive Drive$ using Method%.
  1594.  
  1595.             Pass            ____
  1596.                  FileMask$   File  mask  to  include  in  restore  (e.g.,  *.*,
  1597.                              *.DAT, OLD??.*, etc.)
  1598.  
  1599.                  Method%     The method to use in making the back-up
  1600.                              1 = DOS Copy
  1601.                              2 = ARJ (req. a lot of free memory)
  1602.                              3 = LHARC
  1603.                              4 = PKZIP
  1604.  
  1605.             Returns            _______
  1606.                  0 = Completed
  1607.                  1 = Cancelled
  1608.                  2 = Bad file mask
  1609.                  3 = No files matching file mask
  1610.  
  1611.             Notes            _____
  1612.                  Requires GetValidPath$() function (GETPATH.OBJ)
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.                                     ANGELIB for BC7/PDS                       25                                    ___________________
  1652.  
  1653.  
  1654.  
  1655.  
  1656.           FileRestore%                    ec% = FileRestore%(FileMask$, Method%)
  1657.             Menu of  floppy drives  then if  Method% is  2, 3, or  4 a  menu of
  1658.             files matching  FileMask$ (user  can select  one to  restore).   If
  1659.             Method%=1 all files matching FileMask$ are restored.
  1660.  
  1661.             Pass            ____
  1662.                  FileMask$   Files to restore (*.*, *.DAT, OLD??.*, etc.)
  1663.  
  1664.                  Method%     The method to use in restoring
  1665.                              1 = DOS Copy
  1666.                              2 = ARJ (req. a lot of free memory)
  1667.                              3 = LHARC
  1668.                              4 = PKZIP
  1669.                              Anything else = DOS Copy
  1670.  
  1671.             Returns            _______
  1672.                  0 = Completed
  1673.                  1 = Cancelled
  1674.                  2 = Bad file mask
  1675.                  3 = No files matching file mask
  1676.  
  1677.             Notes            _____
  1678.                  Requires ChooseFile$() function (CHOOSEFL.OBJ).
  1679.  
  1680.  
  1681.  
  1682.  
  1683.           FileRestores%                  ec% = FileRestores%(FileMask$, Method%)
  1684.             Same  as FileRestore%() function  above except that user can select
  1685.             one  or  multiple  files  to restore.    See  FileRestore%() for  a
  1686.             description of the parameters.
  1687.  
  1688.             Notes            _____
  1689.                  Requires ChooseFileS$()  function (CHOOSEFS.OBJ).  Will add ½k
  1690.             to 10k to your code size over using FileRestore%().
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.                                     ANGELIB for BC7/PDS                       26                                    ___________________
  1718.  
  1719.  
  1720.  
  1721.  
  1722.           FKeys                                                      FKeys Keys$
  1723.             Displays a list of function keys at the bottom of the screen.
  1724.  
  1725.             Pass            ____
  1726.                  Keys$       String of  keys  to be  displayed (e.g.,  "EPNQ").
  1727.                              Plus sign  (+) is  a reserved character.   If  the
  1728.                              first character  is a plus  sign followed by  two-
  1729.                              digits, then the keys are placed  starting on that
  1730.                              row.  For example, "+24EPNQ" would  place the keys
  1731.                              on row 24/25, instead of the default rows 23/24.
  1732.  
  1733.             Notes            _____
  1734.  
  1735.             The file  FKEY.LST  is  seached  first  if it  is  in  the  current
  1736.             directory, then  an internal list is  searched if the  keys are not
  1737.             found.  The format of FKEY.LST ASCII file is:
  1738.  
  1739.                  KeyCode$,KeyName$,KeyDesc$,XPos%
  1740.  
  1741.             For example, a  line reading "C,Enter,Continue,51" would place  the
  1742.             key  "Enter" (in  reverse  video)  and the  description  "Continue"
  1743.             under  it at  column  51  whenever an  FKeys  "C"  is issued  in  a
  1744.             program.  See the sample FKEY.LST file.
  1745.  
  1746.             The routine scans the first screen row  at column 1 for the  colour
  1747.             to use.
  1748.  
  1749.             The keys "AacCFNoPQSsTtyn" are defined internally as follows:
  1750.                  A - Up and Down arrows
  1751.                  a - Up/Down/Right/Left arrows
  1752.                  C - Esc = Cancel
  1753.                  c - Enter = Continue
  1754.                  N - PgDn = Next
  1755.                  o - Enter = OK
  1756.                  P - PgUp = Prev
  1757.                  Q - Esc = Quit
  1758.                  S - Enter = Select
  1759.                  s - Esc = Stop
  1760.                  T - TAB = Next
  1761.                  t - BackTAB = Prev
  1762.                  y - Enter = Yes
  1763.                  n - Esc = No
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.                                     ANGELIB for BC7/PDS                       27                                    ___________________
  1784.  
  1785.  
  1786.  
  1787.  
  1788.           FmtFDD%                                                  ec% = FmtFDD%
  1789.             Format floppy disks.
  1790.  
  1791.             Pass            ____
  1792.                  Nothing
  1793.  
  1794.             Returns            _______
  1795.                  TRUE if function completed
  1796.                  FALSE if cancelled
  1797.  
  1798.             Notes            _____
  1799.                  It's easiest to give you an algorithm of the logic flow:
  1800.  
  1801.                  Search DOS PATH for WFF.EXE (What Floppy Format?)
  1802.                  If found, run it and exit
  1803.                  How many drives does this computer have?
  1804.                  If more than 1 present list
  1805.                  Issue DOS command "FORMAT d:" and exit
  1806.  
  1807.                  I always  put a  "Format Floppies" option  under my  File menu
  1808.                  which  simply  does  "i% =  FmtFDD".   See  also  FromFDD% and
  1809.                  ToFDD% functions.
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.                                     ANGELIB for BC7/PDS                       28                                    ___________________
  1850.  
  1851.  
  1852.  
  1853.  
  1854.           FontDL                          FontDL FontFile$, Pts%, Port%, FontNo%
  1855.             Downloads  a  soft  font file  to a  laser  printer and  displays a
  1856.             status window while doing so.
  1857.  
  1858.             Pass            ____
  1859.                  FontFile$   The full  file name, including  drive and path  if
  1860.                              necessary,  of   the   soft   font  file   to   be
  1861.                              downloaded.
  1862.  
  1863.                  Port%       The port number (1-3) of the printer.
  1864.  
  1865.                  FontNo%     PCL font number  to assign this font (e.g.,  400).
  1866.                              Numbers  >128 are  generally best  to  use as  the
  1867.                              lower numbers have  standard fonts which typically
  1868.                              apply to them.
  1869.  
  1870.             Returns            _______
  1871.                  Pts%        The  point size of  the font  is returned  in this
  1872.                              variable.
  1873.  
  1874.             Example            _______
  1875.                  ok% = FontDL%(FontFile$, Pts%, Port%, FontNo%)
  1876.                  if ok% then
  1877.                      PRINT #PrintFile%, chr$(27)+"("+ltrim$(str$(FontNo%))+"X"
  1878.                      end if
  1879.  
  1880.             Notes            _____
  1881.                  The above  sequence selects FontNo% as  the primary font  (the
  1882.                  '('  does  this).   To select  it  as the  secondary font  use
  1883.                  chr$(27)+"("+ltrim$(str$(FontNo%))+"X"
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.                                     ANGELIB for BC7/PDS                       29                                    ___________________
  1916.  
  1917.  
  1918.  
  1919.  
  1920.           GetDate                          GetDate d%, m%, y%, Intl%, Row%, Col%
  1921.             Accepts date from keyboard at {Row%,Col%}  unformatted (no symbols,
  1922.             just  numbers run  together).   Extended keys  (arrows, PgUp, etc.)
  1923.             will  exit  plus  a mouse  button  push  or  the  Alt  key.   Intl%
  1924.             determines the sequence of entry.
  1925.  
  1926.             Pass            ____
  1927.                  d%          Default  day (1-31),  zero to  use to-day's  date,
  1928.                              negative to skip the day
  1929.  
  1930.                  m%          Default  month number, zero to  use current month,
  1931.                              negative to skip the month
  1932.  
  1933.                  y%          Default  year  number  (4  digits),  zero  to  use
  1934.                              current year, negative to skip the year
  1935.  
  1936.                  Intl%       Country  setting   (1=US,  2=Cdn,   3=US  &   Cdn,
  1937.                              4=Other)
  1938.  
  1939.                  Row%        Screen row on which to get input
  1940.  
  1941.                  Col%        Screen column in which to get input
  1942.  
  1943.             Returns            _______
  1944.                  d%, m%, and y% are set to user's input
  1945.  
  1946.  
  1947.  
  1948.  
  1949.           GetFileDesc$                               desc$ = GetFileDesc$(file$)
  1950.             Get a  file's description  (long name) from the  DESCRIPT.* file in
  1951.             the current directory.
  1952.  
  1953.             Pass            ____
  1954.                  file$       DOS file  name.   You can specify a  drive & path,
  1955.                              but  the current  directory will  be accessed  for
  1956.                              the DESCRIPT.* file.
  1957.  
  1958.             Returns            _______
  1959.                  Description (long name) of the file.
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.                                     ANGELIB for BC7/PDS                       30                                    ___________________
  1982.  
  1983.  
  1984.  
  1985.  
  1986.           GetFileName$     afile$ = GetFileName$(InOut%, ttl$, msg$, dflt$, ms%)
  1987.             Get  a file name  from user  in a  window, verify proper  format of
  1988.             entry, and check status of file.
  1989.  
  1990.             Pass            ____
  1991.                  InOut%      Input or Output file?
  1992.                              1 =  Input file  (file must  exist; error  message
  1993.                              displayed if not) ('1' is for 'I'nput)
  1994.                              0 = Output file  (checks that file does not exist;
  1995.                              if file exists, presents a warning  that file will
  1996.                              be over-written) ('0' is for 'O'utput)
  1997.  
  1998.                  ttl$        Title of window
  1999.  
  2000.                  msg$        Help  message displayed  on the  screen below  the
  2001.                              file entry window
  2002.  
  2003.                  dflt$       Default response
  2004.  
  2005.                  ms%         Mouse flag (0=no mouse, non-zero=use mouse)
  2006.                              Mouse cursor should be invisible (off)
  2007.  
  2008.             Returns            _______
  2009.                  Name of file, including drive and path (if entered)
  2010.  
  2011.  
  2012.  
  2013.  
  2014.           GetFileNames$   files$ = GetFileNames$(InOut%, ttl$, msg$, dflt$, ms%)
  2015.             Same as  GetFileName$ except  that user can  specify more  than one
  2016.             input file.
  2017.  
  2018.             Pass            ____
  2019.                  InOut%      Input or Output file?
  2020.                              1  = Single input file
  2021.                              -1 = Multiple input files
  2022.                              0  = Output file
  2023.  
  2024.             Everything else is the same as GetFileName$() above.
  2025.  
  2026.             Returns            _______
  2027.                  Drive and  path (if entered) followed  by file name(s)  padded
  2028.             to 12 spaces.
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.                                     ANGELIB for BC7/PDS                       31                                    ___________________
  2048.  
  2049.  
  2050.  
  2051.  
  2052.           GetFontInfo                      GetFontInfo File$, FontName$, PtSize%
  2053.             Provides name  &  size in  the header  of a  soft font  file.   Try
  2054.             FontDL% on your laser for a demonstration of this.
  2055.  
  2056.             Pass            ____
  2057.                  File$       The name  of the  soft font,  including drive  and
  2058.                              path, if necessary.
  2059.  
  2060.             Returns            _______
  2061.                  FontName$   The  long name  of the  font is  returned in  this
  2062.                              variable, if present  (some fonts do not have  any
  2063.                              name in the header)
  2064.  
  2065.                  PtSize%     In  the font file's header  is a point size -- the
  2066.                              integer  value   of  this  is  returned   (decimal
  2067.                              chopped off).   Although this  should be the  real
  2068.                              point size, it's possible for it to be wrong.
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.                                     ANGELIB for BC7/PDS                       32                                    ___________________
  2114.  
  2115.  
  2116.  
  2117.  
  2118.           GetNum$       n$ = GetNum$(iRow%, iCol%, NumMask$, OrigNo$, ExitCode%)
  2119.             Get formatted  numerical input  from user.   Screen colours  at the
  2120.             specified  location will be inverted during input and restored upon
  2121.             exit.
  2122.  
  2123.             Pass            ____
  2124.                  iRow%       Row at which to get input
  2125.  
  2126.                  iCol%       Left column at which to get input
  2127.  
  2128.                  NumMask$    Format  mask.   Valid  mask  characters  are pound
  2129.                              (#),  dollar ($),  and  comma  (,); all  else  are
  2130.                              literals (same  as PRINT  USING).  E.g.,  "#,###",
  2131.                              "$$##.##" or "(###) ###-####".
  2132.  
  2133.                  OrigNo$     Default number in string  form to avoid  numerical
  2134.                              data type conflicts.   Can be integer or  floating
  2135.                              point.
  2136.  
  2137.             Returns            _______
  2138.                  User's  entry as  a string  (use VAL  to  extract it  into the
  2139.                  proper variable; for example, Cost@=VAL(A$) or Miles%=VAL(A$)
  2140.  
  2141.                  ExitCode%   ASCII value  of key user pressed  to exit.   E.g.,
  2142.                              Esc =  27.   If an extended  key (e.g.,  F4, PgUp,
  2143.                              etc.) is used ExitCode% is negative.
  2144.  
  2145.             Example            _______
  2146.                  A$=GetNum$(15,30,"$$###.##",STR$(UnitPrice@),ExitCode%)
  2147.  
  2148.                  In  the  above  example  an input  field  will  be created  at
  2149.                  location (15,30).   The original  number, UnitPrice@, will  be
  2150.                  formatted and  displayed using the  mask "$$###.##", then  the
  2151.                  computer will  wait for the  user's input.   The key that  the
  2152.                  user  presses  to  exit  the field  will  be  returned in  the
  2153.                  variable ExitCode%.
  2154.  
  2155.                  See FKEYS.BI for key definitions.
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.                                     ANGELIB for BC7/PDS                       33                                    ___________________
  2180.  
  2181.  
  2182.  
  2183.  
  2184.           GetValidPath               GetValidPath Drv$, path$, Msg$, InOut%, ms%
  2185.             Displays  Msg$ then asks user for  a valid path name, defaulting to
  2186.             Drv$ and  Path$.  If path does not  exist and it  is being used for
  2187.             output, user is asked if s/he wants to create it.
  2188.  
  2189.             Pass            ____
  2190.                  Drv$        Default drive (e.g., "C:")
  2191.  
  2192.                  Path$       Default path (e.g., "\TEST\DIR")
  2193.  
  2194.                  Msg$        Helpful message  to display on  the screen  (using
  2195.                              Inform%)
  2196.  
  2197.                  InOut%      1=Input/0=Output
  2198.                              If  InOut%=0 will  prompt  to create  a  directory
  2199.                              that does not exist.
  2200.  
  2201.                  ms%         0=No mouse, 1=Use mouse
  2202.  
  2203.             Returns            _______
  2204.                  Drv$        Selected drive letter followed by a colon
  2205.  
  2206.                  Path$       Selected path with trailing  foreslash (\)  (e.g.,
  2207.                              "\TEST\DIR\")
  2208.  
  2209.             Notes            _____
  2210.                  The mouse must be initialized and visible to use  it.  To keep
  2211.                  things simple  & save  stack space, the  windows are  at fixed
  2212.                  positions (which also helps keep things consistent, too).
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.                                     ANGELIB for BC7/PDS                       34                                    ___________________
  2246.  
  2247.  
  2248.  
  2249.  
  2250.           GoodbyeScreen          GoodbyeScreen Pkg$, Reg%, FirstUse$, TimesUsed%
  2251.             Presents a  'goobye screen'  with which  I end  my programmes.   It
  2252.             also has  my name on it... :)   When you  register ANGELIB you will
  2253.             get a version which lets you put your copyright message on it.
  2254.  
  2255.             Pass            ____
  2256.                  Pkg$        Package abbreviation  (e.g., "WVH",  "WML", etc.).
  2257.                              Should be a short name to fit properly in window.
  2258.  
  2259.                  Reg%        Registration   flag,  true/false,   controls   the
  2260.                              information displayed
  2261.  
  2262.                  FirstUse$   Date of  first use.   Used to  calculate number of
  2263.                              days package has been used.
  2264.  
  2265.                  TimesUsed%  Number of times package has been used.
  2266.  
  2267.             Returns            _______
  2268.                  Nothing
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.                                     ANGELIB for BC7/PDS                       35                                    ___________________
  2312.  
  2313.  
  2314.  
  2315.  
  2316.           HelpIndex                                  HelpIndex Topic$, FileSpec$
  2317.             Displays a help index (menu) or a specific help screen.
  2318.  
  2319.             Pass            ____
  2320.                  Topic$      A  specific topic to look up (as  might be desired
  2321.                              with context-sensitive help).   If blank an  index
  2322.                              is presented in a scrollable menu.  Once the  user
  2323.                              selects a topic, the help text  is displayed using
  2324.                              the Inform% function.
  2325.  
  2326.                  FileSpec$   The specification  for the help  file.  If  blank,
  2327.                              "*.HLP" is used.   FileSpec$ may contain a  drive,
  2328.                              path, and/or file name (wildcards okay).
  2329.  
  2330.             Returns            _______
  2331.                  Nothing.
  2332.  
  2333.             Notes            _____
  2334.  
  2335.             The help file is an ASCII text file which is arranged like this:
  2336.  
  2337.             Topic #1+chr$(4)+Help information
  2338.               more information at least one space from left
  2339.               more help etc. etc.
  2340.             Topic #2+chr$(4)+Help info...
  2341.  
  2342.             Help  files may contain up to 100 topics.   The total length of the
  2343.             help text for a single entry is limited to 99 lines with  a maximum
  2344.             of  50 characters per line (roughly 4k of text).  Topics MUST begin
  2345.             in column  one, additional  text MUST begin  AFTER column  1 (i.e.,
  2346.             indent the help text at least one space).
  2347.  
  2348.             The topic  may begin with a chr$(1) through  chr$(3) to indicate an
  2349.             outline  level.      For  example,   you  might   have  FILE   then
  2350.             chr$(1)+Open.
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.                                     ANGELIB for BC7/PDS                       36                                    ___________________
  2378.  
  2379.  
  2380.  
  2381.  
  2382.           Inform%    ok% = Inform%(iRow%, iCol%, iWid%, iType%, ms%, snd%, Msg$)
  2383.             Displays a scrollable information window containing up to  99 lines
  2384.             of information.   Msg$ may be any  length.  The routine will  break
  2385.             the message  into lines of  iWid% length  or less.   If the box  is
  2386.             positioned too low on the screen, it will be adjusted upwards.
  2387.  
  2388.             Pass            ____
  2389.                  iRow%       Top row of window
  2390.                  iCol%       Left column of window
  2391.                  iWid%       Window width (in characters)
  2392.  
  2393.                  iType%      Determines buttons (see below)
  2394.                              0="Message" (no buttons)
  2395.                              1="Note" (Ok button)
  2396.                              2="Caution" (Ok/Cancel)
  2397.                              3="Warning" (blinking) (Continue/Stop)
  2398.                              4="Attention" (blinking) (Yes/No)
  2399.  
  2400.                  ms%         Mouse support
  2401.                              0 = No mouse
  2402.                              1 = Mouse available
  2403.                              99 = Reset mouse & use it, if available
  2404.  
  2405.                  snd%        Sound: 0=None 1=Squeak 2=Tick 3=Beep
  2406.                  Msg$        Message  to  display  in  the  window.    Will  be
  2407.                              truncated at 99 lines, if necessary.
  2408.  
  2409.             Returns            _______
  2410.                  TRUE if user presses ENTER to exit
  2411.                  FALSE if user presses ESC to exit
  2412.  
  2413.             Notes            _____
  2414.  
  2415.             All message  types except  zero restore  the screen on  exit.   Use
  2416.             iType%=0  when you want to put  information on the screen and leave
  2417.             it there, such as instructions on how to enter data.
  2418.  
  2419.             The mouse should be turned OFF before calling Inform%
  2420.  
  2421.             Custom Titles            _____________
  2422.  
  2423.             A custom title  can replace the default.   Just place a title  plus
  2424.             chr$(254) at  the start  of your message  (changed from  chr$(4) to
  2425.             allow the code to be imbedded without the use of the CHR$ function
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.                                     ANGELIB for BC7/PDS                       37                                    ___________________
  2444.  
  2445.  
  2446.  
  2447.  
  2448.           InformFill        InformFill Row%, Col%, BegLine%, WinSize%, MLines$()
  2449.             Used by Inform% -- fills the window with text.
  2450.  
  2451.  
  2452.  
  2453.  
  2454.           InputDate       InputDate Mo%, Dy%, Yr%, DtStr$, Row%, Col%, ExitCode%
  2455.             Accepts a valid date.  Unlike GetDate, InputDate only supports  the
  2456.             DD/MM/YYYY format and does not check for a mouse  button or the Alt
  2457.             key  being  pressed.   However,  the  input  is  formatted  whereas
  2458.             GetDate has all the numbers run together.
  2459.  
  2460.             Pass            ____
  2461.                  Mo%         Month number (1-12)
  2462.                              Zero for current month
  2463.                              -1 to skip month
  2464.  
  2465.                  Dy%         Day number (1-31)
  2466.                              Zero for current day
  2467.                              -1 to skip day
  2468.  
  2469.                  Yr%         Year number (4 digits)
  2470.                              Zero for current year
  2471.                              -1 to skip year
  2472.  
  2473.                  r%/c%       Screen row & column at which to display/get date
  2474.  
  2475.             Returns            _______
  2476.                  DtStr$      Date string formatted MM/DD/YYYY.
  2477.  
  2478.                  ExitCode%   Set to the key used to exit.
  2479.  
  2480.             Example 1            _________
  2481.                  M%=0: D%=0: Y%=0: row%=10: col%=20
  2482.                  InputDate M%, D%, Y%, DtStr$, row%, col%, ExitCode%
  2483.  
  2484.                  This will  get the  date at location {10,20}  using the system
  2485.                  date as default.  Because InputDate is a BASIC subroutine,  it
  2486.                  is not necessary to initialize DtStr$ before using it.
  2487.  
  2488.             Example 2            _________
  2489.                  M%=5: D%=-1: Y%=0: row%=10: col%=20
  2490.                  InputDate M%, D%, Y%, DtStr$, row%, col%, ExitCode%
  2491.  
  2492.                  This will get a  month and year at location {10,20}  using May
  2493.                  and the system clock's year as default.
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.                                     ANGELIB for BC7/PDS                       38                                    ___________________
  2510.  
  2511.  
  2512.  
  2513.  
  2514.           IsColour%                                               x% = IsColour%
  2515.             Get adapter card type.
  2516.  
  2517.             Pass            ____
  2518.                  Nothing
  2519.  
  2520.             Returns            _______
  2521.                  True (-1) if colour adapter card, otherwise False (0).
  2522.  
  2523.  
  2524.  
  2525.  
  2526.           IsPath%                             stat% = IsPath%(Pathname$, InOut%)
  2527.             Checks validity  & extends  path.  If  directory is  being accessed
  2528.             for output and does not exist, user is prompted to create it.
  2529.  
  2530.             Pass            ____
  2531.                  TheName$    Path name in the format [d:][\path\]
  2532.                              If the drive or full path are  missing the current
  2533.                              drive/path are inserted
  2534.  
  2535.                  InOut%      1=Input/0=Output
  2536.                              If  directory does  not  exist  and InOut%=0  then
  2537.                              user will be prompted to create the directory
  2538.  
  2539.             Returns            _______
  2540.                  0 = Path not found/not created (suitable for Output)                                                              _
  2541.                  1 = Path exists (suitable for Input)                                               _
  2542.                  -1 = Bad path specification, or -2 = Other error
  2543.  
  2544.                  TheName$    Contains the  fully extended  path name  including
  2545.                              the drive  letter unless user  hit Esc when  asked
  2546.                              permission to create the directory.
  2547.  
  2548.             Example            _______
  2549.             Assume the current path is C:\ugh\ and no directories under it.
  2550.  
  2551.                  Path$ = "test": InOut% = 0
  2552.                  stat% = IsPath%(Path$, InOut%)
  2553.                  select case stat%
  2554.                       case 0    'Path not found & not created (user hit Esc)
  2555.                       case 1    'Path found, everything okay
  2556.                       case is < 0  'Bad path specification or DOS error
  2557.  
  2558.             Inform user that C:\ugh\test\  does not exist & ask to create.   If
  2559.             "No" stat%=0 & Path$="test", else stat%=1 & Path$="C:\ugh\test\"
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.                                     ANGELIB for BC7/PDS                       39                                    ___________________
  2576.  
  2577.  
  2578.  
  2579.  
  2580.           Max%                                           Highest% = Max%(A%, B%)
  2581.             Returns the larger of the two integers
  2582.  
  2583.  
  2584.  
  2585.  
  2586.           MaxL&                                         Highest& = MaxL&(A&, B&)
  2587.             Returns the larger of two long integers.
  2588.  
  2589.  
  2590.  
  2591.  
  2592.           MaxS!                                         Highest! = MaxS!(A!, B!)
  2593.             Returns the larger of two single-precision floating point numbers.
  2594.  
  2595.  
  2596.  
  2597.  
  2598.           Min%                                            Lowest% = Min%(A%, B%)
  2599.             Returns the smaller of two integers.
  2600.  
  2601.  
  2602.  
  2603.  
  2604.           MinL&                                          Lowest& = MinL&(A&, B&)
  2605.             Returns the smaller of two long integers.
  2606.  
  2607.  
  2608.  
  2609.  
  2610.           MinS!                                          Lowest! = MinS!(A!, B!)
  2611.             Returns the smaller of two single precision numbers.
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.                                     ANGELIB for BC7/PDS                       40                                    ___________________
  2642.  
  2643.  
  2644.  
  2645.  
  2646.           MonthDays%                                NoDays% = MonthDays%(M%, Y%)
  2647.             Returns the number of days in month M% of year Y%.
  2648.  
  2649.             Pass            ____
  2650.                  M%          Month (1-12)
  2651.                  Y%          Year (2 or 4 digits)
  2652.  
  2653.             Returns            _______
  2654.                  Number of days in the specified month
  2655.  
  2656.             Example            _______
  2657.                  MonthDays%(2,1992) returns 29
  2658.  
  2659.  
  2660.  
  2661.  
  2662.           OutDev$                                    PDev$ = OutDev$(Port%, ms%)
  2663.             Presents a menu of output devices: Screen, Printer, and Disk  File.
  2664.             If Disk  File is  selected the  user is  prompted for  a file  name
  2665.             (using  GetFileName$).   If Printer is selected  the routine checks
  2666.             if the printer is on-line (that's  partly why Port% is needed)  and
  2667.             returns the device  name as  "LPT1:", "LPT2:",  or "LPT3:"  (that's
  2668.             also why Port% is needed).
  2669.  
  2670.             Pass            ____
  2671.                  Port%       Port number of printer (1, 2, or 3)
  2672.  
  2673.                  ms%         Mouse support:  0=no, non-zero=yes
  2674.  
  2675.             Returns            _______
  2676.                  Device or file name
  2677.  
  2678.  
  2679.  
  2680.  
  2681.           OutDevs$                                  PDev$ = OutDevs$(Port%, ms%)
  2682.             Same  as   OutDev$  function,  but   for  use  with   ChooseFiles$,
  2683.             FileRestore2%, GetFileNames$, and SelectSoftFonts% routines.
  2684.  
  2685.             See OutDev$ function for details.
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.                                     ANGELIB for BC7/PDS                       41                                    ___________________
  2708.  
  2709.  
  2710.  
  2711.  
  2712.           ParseFSpec             ParseFSpec TheName$, Drv$, Pathname$, TheName2$
  2713.             Searches file name for the drive, path, and NAME.EXT components.
  2714.  
  2715.             Pass            ____
  2716.                  TheName$    Full file name to parse
  2717.  
  2718.             Returns            _______
  2719.                  Drv$        Drive letter followed by a colon (if present)
  2720.  
  2721.                  Pathname$   Path  name, beginning and  ending with a foreslash
  2722.                              (\), if present
  2723.  
  2724.                  TheName2$   FILENAME.EXT, if present
  2725.  
  2726.             Notes            _____
  2727.  
  2728.             Converts the  regular slash (/)  to a foreslash  (\), in case  user
  2729.             enters the wrong one.
  2730.  
  2731.             If  an invalid file name  is entered (for  example, more than eight
  2732.             characters  in  the  name  or more  than  three  characters in  the
  2733.             extension) then TheName2$ is returned as a blank string.
  2734.  
  2735.             The  original file name, TheName$, is  not changed so that if there
  2736.             is an error it can be given to the user for editing again.
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.                                     ANGELIB for BC7/PDS                       42                                    ___________________
  2774.  
  2775.  
  2776.  
  2777.  
  2778.           PctDone                                       PctDone Percent%, title$
  2779.             Displays a  graph of  percentage completion in  a small box  on the
  2780.             screen. If  the process  takes longer than 20  seconds a count-down
  2781.             timer will appear below the graph.
  2782.  
  2783.             Pass            ____
  2784.                  Percent%    Percentage to  draw on the  graph.  The first time
  2785.                              PctDone is called a  small window is  drawn.  When
  2786.                              Percent% is 100 the window is erased.
  2787.  
  2788.                  title$      A  short title (10  chars max) to display over the
  2789.                              progress bar.
  2790.  
  2791.             Returns            _______
  2792.                  Nothing
  2793.  
  2794.             Notes            _____
  2795.  
  2796.             You must  call PctDone with  100 to clear it  or the  next time you
  2797.             call it it will think the window is still on the screen...
  2798.  
  2799.             Example            _______
  2800.                  For Sort%=0 to Y%
  2801.                      if 100 * Sort% \ Y% < 100 then
  2802.                          PctDone(100 * Sort% \ Y%,"Sorting")
  2803.                          endif
  2804.                      do something...
  2805.                      next Sort%
  2806.                  PctDone 100,""    'Close the window/reset the routine
  2807.  
  2808.  
  2809.  
  2810.  
  2811.           PrintRptMsg                                           PrintRptMsg Msg$
  2812.             Displays a window saying  "Printing "+Rpt$+" Press  Esc to cancel."
  2813.             I use this on every report so I made it into a routine.
  2814.  
  2815.             Example            _______
  2816.                  Rpt$ = "Stock Status Report"
  2817.                  PrintRptMsg Rpt$
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.                                     ANGELIB for BC7/PDS                       43                                    ___________________
  2840.  
  2841.  
  2842.  
  2843.  
  2844.           PtrReady%                                       ok% = PtrReady%(Port%)
  2845.             Checks if printer on LPT[Port%] is on-line.
  2846.  
  2847.             Pass            ____
  2848.                  Port%       Printer port (1, 2, or 3)
  2849.  
  2850.             Returns            _______
  2851.                  TRUE if ready, FALSE if not
  2852.  
  2853.             Notes            _____
  2854.                  It doesn't matter whether or not you  have opened a channel to
  2855.                  the printer before calling this routine.
  2856.  
  2857.  
  2858.  
  2859.  
  2860.           QSort    QSort Wrk%(), Arr1$(), Arr2$(), NoDims%, NoItems%, SortField%
  2861.             A good public domain sorting  method.  Used by ChooseFile$ to  sort
  2862.             the file list.
  2863.  
  2864.             See  the source code in QSORT.SUB.  This is  not my code -- I'm not
  2865.             selling it, I just use it and pass it on to you...
  2866.  
  2867.  
  2868.  
  2869.  
  2870.           Repl$                                cmd$ = Repl$(St$, Target$, Item$)
  2871.             Replaces occurence of  Target$ in St$ with  Item$.  Good for  laser
  2872.             printer codes.
  2873.  
  2874.             Pass            ____
  2875.                  St$         Complete string
  2876.  
  2877.                  Target$     The part of St$ to be replaced
  2878.  
  2879.                  Item$       The replacement for Target$
  2880.  
  2881.             Returns            _______
  2882.                  The modified string with trailing spaces & nulls truncated.
  2883.  
  2884.             Example            _______
  2885.                  Repl$("&a#V ","#","500") will return "&a500V"
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.                                     ANGELIB for BC7/PDS                       44                                    ___________________
  2906.  
  2907.  
  2908.  
  2909.  
  2910.           SayOk                                            SayOk Row%, Col%, ms%
  2911.             Puts an "Ok" button centred at position {Row%, Col%} and an  "Enter
  2912.             /  Continue" message at the  bottom of the screen, flushes keyboard
  2913.             buffer, then waits for mouse or keyboard to exit.
  2914.  
  2915.             Pass            ____
  2916.                  Row%        Row on which to place button
  2917.                  Col%        Middle of button
  2918.                  ms%         Use mouse support? (True/False)
  2919.  
  2920.             Returns            _______
  2921.                  Nothing
  2922.  
  2923.             Notes            _____
  2924.                  Scans screen at  {Row%-1, Col%} and inverts the colours  found
  2925.             there -- the idea  being to make the button stand out from the lines
  2926.             above it.
  2927.                  If  ms% is non-zero (True)  then the mouse must be initialized
  2928.             but invisible.
  2929.  
  2930.  
  2931.  
  2932.  
  2933.           SearchPath$                                a$ = SearchPath$(FileName$)
  2934.             Searches the DOS PATH environment variable for a file.
  2935.  
  2936.             Pass            ____
  2937.                  FileName$   Name of file for which to search  (file name only;
  2938.                              no drive or path)
  2939.  
  2940.             Returns            _______
  2941.                  If file is found, DOS path with trailing foreslash (\)
  2942.                  If file is not found, returns blank string ("")
  2943.  
  2944.             Example            _______
  2945.                  Assuming you have C:\ in your search path...
  2946.  
  2947.                  A$ = SearchPath$("Config.sys")
  2948.  
  2949.                  will set A$ = "C:\"
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.                                     ANGELIB for BC7/PDS                       45                                    ___________________
  2972.  
  2973.  
  2974.  
  2975.  
  2976.           SelectFont%    ok% = SelectFont%(m$,path$,PtrNo%,Pts%,Ext$,SFdir$,ms%)
  2977.             Displays  a scrollable list of soft fonts in a window and waits for
  2978.             user to select  one or press Esc.   List  will show DOS file  name,
  2979.             font  name (if present  in header)  and point  size (if  present in
  2980.             header).
  2981.  
  2982.             Pass            ____
  2983.                  m$          Purpose  of  font,  displayed  at  top  of  window
  2984.                              (e.g., "Printing", "Reports", "Titles", etc.)
  2985.  
  2986.                  path$       File  specification  for  PRINTER.DAT file.  path$
  2987.                              may contain a  drive, path, and/or  file name.  If
  2988.                              no file  name is given,  PRINTER.DAT is  used.  If
  2989.                              no drive  & path are  given, the  current drive  &
  2990.                              path are used.
  2991.  
  2992.                  PtrNo%      The printer's record number in PRINTER.DAT
  2993.  
  2994.                  Ext$        Soft  font   file  extension   (e.g.,  "SFP"   for
  2995.                              portrait fonts, "SFL" for landscape fonts)
  2996.  
  2997.                  SFdir$      Default soft font directory (e.g., "C:\Fonts")
  2998.  
  2999.                  ms%         Mouse support:  0=no mouse, 1=use mouse
  3000.  
  3001.             Returns            _______
  3002.                  Function returns font's  record number in PRINTER.DAT or  zero
  3003.                  if user presses Esc
  3004.  
  3005.                  m$          Changed  to soft font  file name  (including path)
  3006.                              if soft font selected
  3007.  
  3008.                  Pts%        Changed to point size if scalable font
  3009.  
  3010.                  SFdir$      Soft font directory with any user modifications
  3011.  
  3012.             Notes            _____
  3013.                  Mouse must be initialized but turned OFF
  3014.  
  3015.  
  3016.  
  3017.  
  3018.           SelectFonts%  ok% = SelectFonts%(m$,path$,PtrNo%,Pts%,Ext$,SFdir$,ms%)
  3019.             Same as SelectFont%()  function except that it uses  ChooseFileS$()
  3020.             (instead of ChooseFile$()).
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.                                     ANGELIB for BC7/PDS                       46                                    ___________________
  3038.  
  3039.  
  3040.  
  3041.  
  3042.           SelectFontSize%             Pts% = SelectFontSize%(Font$, IsPts%, ms%)
  3043.             This routine  gets the  user's choice  for font  size in a  window.
  3044.             This routine  is called  whenever a  scalable font  is selected  in
  3045.             SelectFont% (I don't ever use this routine directly).
  3046.  
  3047.             Pass            ____
  3048.                  Font$       The font  name  (for  displaying on  the  screen).
  3049.                              For example, CG Times.
  3050.  
  3051.                  IsPts%      Logical  flag  to indicate  whether point  size is
  3052.                              needed  (versus   character  pitch).     If   true
  3053.                              "points"  is   displayed;   otherwise  (if   zero)
  3054.                              "character pitch" is displayed on screen.
  3055.  
  3056.                  ms%         Mouse flag: 0=no mouse, 1=use mouse
  3057.  
  3058.             Returns            _______
  3059.                  Font size (integer) or zero if user presses Esc.
  3060.  
  3061.             Notes            _____
  3062.                  This  routine  is  called  by  SelectFont%.    Mouse  must  be
  3063.             initialized but turned OFF (invisible cursor).
  3064.  
  3065.  
  3066.  
  3067.  
  3068.           SelectSoftFont$              Font$ = SelectSoftFont$(Path$, Ext$, ms%)
  3069.             This routine presents a scrollable list of soft fonts  in a window.
  3070.             It  is called by  SelectFont% if  the user selects  a soft font (as
  3071.             opposed to a font built into the printer).
  3072.  
  3073.             Pass            ____
  3074.                  Path$       Path to soft fonts
  3075.  
  3076.                  Ext$        Extension to be included in the  list (e.g., "SFP"
  3077.                              for portrait fonts)
  3078.  
  3079.                  ms%         Mouse support (0=no, 1=yes)
  3080.  
  3081.             Returns            _______
  3082.                  Name of chosen font, including drive & path, if necessary.
  3083.  
  3084.                  Path$       Path as modified by user
  3085.  
  3086.             Notes            _____
  3087.                  Uses ChooseFile$() function
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.                                     ANGELIB for BC7/PDS                       47                                    ___________________
  3104.  
  3105.  
  3106.  
  3107.  
  3108.           SelectSoftFonts$            Font$ = SelectSoftFonts$(Path$, Ext$, ms%)
  3109.             Same as SelectSoftFont$() except  this routine uses  ChooseFileS$()
  3110.             instead of ChooseFile$().
  3111.  
  3112.  
  3113.  
  3114.  
  3115.           StrFmt$                            ph$ = StrFmt$(Mask$, St$, reverse%)
  3116.             Formats a  string according to a given mask.  I  use this to format
  3117.             phone numbers, zip codes, etc.
  3118.  
  3119.             Pass            ____
  3120.                  Mask$       Mask (like PRINT USING masks)
  3121.                  St$         String to format
  3122.                  reverse%    Flag: if  TRUE formatting  is done  from right  to
  3123.                              left; if  FALSE (0) formatting  is done from  left
  3124.                              to right. TRUE is the most common setting.
  3125.  
  3126.             Returns            _______
  3127.                  Formatted string
  3128.  
  3129.             Examples            ________
  3130.                  a$ = StrFmt$("8052662574","(###) ###-####",-1)
  3131.                  returns a$ = "(805) 266-2574"
  3132.  
  3133.                  a$ = StrFmt$("2726893","(###) ###-####",-1)
  3134.                  returns a$ = "(   ) 272-6893"
  3135.  
  3136.                  a$ = StrFmt$("93551","#####-####",0)
  3137.                  returns a$ = "93551-    "
  3138.  
  3139.  
  3140.  
  3141.  
  3142.           StripSymbols$                               new$ = StripSymbols$(Old$)
  3143.             This strips any  symbols from  a string of  numbers.   I use it  to
  3144.             strip  the parenthesis, etc. from  phone numbers, etc.  Returns the
  3145.             string St$ stripped of its parenthesis, dashes, and commas.
  3146.  
  3147.             Example            _______
  3148.                  a$ = StripSymbols$("(805) 272-4923")
  3149.  
  3150.                  returns a$ = "8052724923"
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.                                     ANGELIB for BC7/PDS                       48                                    ___________________
  3170.  
  3171.  
  3172.  
  3173.  
  3174.           Trim$                                                   b$ = Trim$(a$)
  3175.             Trims  leading  & trailing  spaces  and trailing  chr$(0)'s from  a
  3176.             string  (using LTRIM$/RTRIM$ will remove  spaces but not nulls).  I
  3177.             use this to  test the length  of static  strings, which are  padded
  3178.             with CHR$(0)'s.
  3179.  
  3180.  
  3181.  
  3182.  
  3183.           ZipFmt$                                   a$ = ZipFmt$(TheZip$, Intl%)
  3184.             Formats a zip code according to Intl% flag.
  3185.  
  3186.             Pass            ____
  3187.                  TheZip$     Unformatted Zip/Postal code
  3188.  
  3189.                  Intl%       1 = USA
  3190.                              2 = Canada
  3191.                              3 = USA plus Canada
  3192.                              4 = Canada plus USA
  3193.                              5 = All others (no formatting)
  3194.  
  3195.             Returns            _______
  3196.                  Formatted zip
  3197.                              USA -- #####-####
  3198.                              Canada -- A#A #A#
  3199.                              Other -- No formatting
  3200.  
  3201.  
  3202.  
  3203.  
  3204.           zTrim$                                                 b$ = zTrim$(a$)
  3205.             This  routine only trims trailing nulls [chr$(0)]  from the string.
  3206.             Good for  trimming fixed-length file fields  which are padded  with
  3207.             nulls when you don't want to remove any spaces  [chr$(32)] from the
  3208.             string.
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.                                     ANGELIB for BC7/PDS                       49                                    ___________________
  3236.  
  3237.  
  3238.  
  3239.  
  3240.           XII. USING PRINTER FUNCTIONS
  3241.  
  3242.                In order to use the printer functions, you will need to include
  3243.           the data structures definition file PtrRec.DEF in your source code. 
  3244.           Place the line '$INCLUDE: 'PtrRec.DEF' near the beginning of your
  3245.           code.
  3246.  
  3247.                Next, you will need to dimension the variables to hold the
  3248.           records.  I use both local and the global (common) variables; either
  3249.           will work fine unless your programme is strapped for memory one way or
  3250.           the other.  For local variables use DIM; to make the variables global
  3251.           use DIM SHARED.  The record types are:
  3252.  
  3253.                LaserPtrRec - Control codes which are not font-specific
  3254.                LaserFontRec - Font-specific control codes
  3255.                DMPtrRec - Dot matrix codes which are not font-specific
  3256.                DMFontRec - Font-specific dot matrix control codes
  3257.  
  3258.                The records are all the same length so that the single file,
  3259.           PRINTER.DAT, can contain all four record types.  Laser printer records
  3260.           start with a greater-than (>) sign (for example, ">Panasonic KX-
  3261.           P4450").  Dot matrix printer records start with a dot (for example,
  3262.           ".NEC P5300").  Both record types (dot matrix and laser) begin with a
  3263.           Model field, so you can use a LaserPtrRec variable to read a dot
  3264.           matrix record, then, if the Model begins with a period, re-read the
  3265.           record as a DMPtrRec variable.
  3266.  
  3267.                Here are the steps your programme will need to take to set
  3268.           everything up:
  3269.                1.  Use the ChoosePtr% function to get and save the user's
  3270.                    choice for a printer
  3271.                2.  Use SelectFont% to get the user's font choice(s).
  3272.                3.  Save printer & font choices in a configuration file.
  3273.                4.  Either at programme start-up or before printing read the
  3274.                    printer control codes into memory.  For example:
  3275.  
  3276.                    DIM SHARED Lz as LaserPtrRec
  3277.                    DIM SHARED DM as DMPtrRec
  3278.                    PtrFile% = FREEFILE
  3279.                    OPEN HomePath$ + "Printer.DAT" FOR RANDOM ACCESS READ SHARED
  3280.                        AS PtrFile% LEN = LEN(Lz)
  3281.                    GET #PtrFile%, PtrRec%, Lz
  3282.                    IF LEFT$(Lz.Model, 1) = "." THEN
  3283.                      GET #PtrFile%, PtrRec%, DM
  3284.                      END IF
  3285.  
  3286.                5.  At programme start-up or before printing read the printer
  3287.                    font codes into memory (like the example below)
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.                                     ANGELIB for BC7/PDS                       50                                    ___________________
  3302.  
  3303.  
  3304.  
  3305.  
  3306.           DIM LF as LaserFontRec
  3307.           DIM DF as DMFontRec
  3308.           ' Normally you would already have PtrFile% open from the
  3309.           ' above routine (to read the printer codes).  If not, you
  3310.           ' would need to open the file as in the above routine.
  3311.           m$ = "Reports": Ext$ = "SFP"                     'Portrait fonts (SFP)
  3312.           FontRec%=SelectFont%(m$, PtrRec%, Pts%, Ext$, SFdir$, ms%)
  3313.           SELECT CASE FontRec%                                     'Check result
  3314.                CASE 0                                       'User hit Escape key
  3315.                  EXIT SUB
  3316.                CASE -1                                     'User chose soft font
  3317.                  PRINT #PrintFile%, zTrim$(Lz.Init);                'Reset laser
  3318.                  Done% = FontDL(SFont$, FPts%, PtrPort%, 400)     'Download font
  3319.                  IF NOT Done% THEN                             'User aborted download; flag routine as 'cancelled'
  3320.                    EXIT FUNCTION or SUB
  3321.                    END IF
  3322.                  IF FPts% > 0 THEN                           'FontDL got a size?
  3323.                      Fcpi% = 120 \ FPts%      'Cvt points to rough CPI for calcs
  3324.                    ELSE                                     'No size in font hdr
  3325.                      Fcpi% = 10                     'Assume 12pt/10cpi for calcs
  3326.                    END IF
  3327.                  PRINT #PrintFile%, CHR$(27); ")400X";       'Secondary, ID #400
  3328.                CASE ELSE
  3329.                  IF Ptr$ = "D" THEN                          'DOT MATRIX PRINTER
  3330.                      GET #PtrFile%, FontRec%, DF
  3331.                      PRINT #PrintFile%, zTrim$(DM.Init);                  'Reset
  3332.                      PRINT #PrintFile%, zTrim$(DF.Select);          'Select font
  3333.                      T$=Trim$(DM.HTab) + CHR$(2 * Fcpi) + CHR$(0)  'Set tab @ 2"
  3334.  
  3335.                    ELSE                                           'LASER PRINTER
  3336.                      GET #PtrFile%, FontRec%, LF
  3337.                      PRINT #PrintFile%, zTrim$(LF.SymSet2);      'Make secondary
  3338.                      PRINT #PrintFile%, zTrim$(LF.Select2);     'Use SymSet1 etc
  3339.                      PRINT #PrintFile%, zTrim$(LF.Spacing);     'to make Primary
  3340.                      IF VAL(LF.Pitch) = 0 THEN                   'Scalable font?
  3341.                        PRINT #PrintFile%,LTRIM$(STR$(Pts%));         'Point size
  3342.                        END IF                                '(from SelectFont%)
  3343.                      PRINT #PrintFile%, zTrim$(LF.Pitch);      'Pitch select cmd
  3344.                      PRINT #PrintFile%, zTrim$(LF.Slant);        'Upright/italic
  3345.                      PRINT #PrintFile%, zTrim$(LF.Weight);       'Light/Med/Bold
  3346.                      PRINT #PrintFile%, zTrim$(LF.Number);      'PCL font number
  3347.                      IF RIGHT$(zTrim$(LF.Pitch), 1) = "h" THEN     'Mono-spaced?
  3348.                          Fcpi% = VAL(LF.Pitch)                        'Store cpi
  3349.                          FPts% = 120 \ temp1%       'Cvt cpi to rough pts if nec
  3350.                        ELSE
  3351.                          FPts% = VAL(LF.Pitch)                     'Store points
  3352.                          Fcpi% = 120 \ TPts%        'Cvt pts to rough cpi if nec
  3353.                        END IF
  3354.                    END IF
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.                                     ANGELIB for BC7/PDS                       51                                    ___________________
  3368.  
  3369.  
  3370.  
  3371.  
  3372.                END SELECT
  3373.           CLOSE #PtrFile%
  3374.  
  3375.                Now you have the printer ready to go and you have the variables
  3376.           Fcpi% and Fpts% to work with in calculating TAB locations, line
  3377.           length, etc.
  3378.  
  3379.                You will notice that I use zTrim$() rather than just printing a
  3380.           variable.  This is because BASIC pads TYPE fields with nulls -
  3381.           CHR$(0)'s.  The zTrim$() function removes CHR$(0)'s but leaves
  3382.           trailing spaces (which may be part of the command string).
  3383.  
  3384.                There are some things that you must know, such as that the pitch
  3385.           command for a PCL (laser) printer ends in "h" if it is mono-spaced
  3386.           (cpi) and "v" if it is proportionally-spaced (points).  Also, in
  3387.           setting a TAB string in the above example I used the Epson-standard
  3388.           which terminates the setting of TABs with a CHR$(0).  This is the best
  3389.           solution I have come up with, and every printer I've seen in the past
  3390.           five years uses Epson codes anyhow, so I figure this technique will
  3391.           work 90% of the time or better.
  3392.  
  3393.                You can make your own PRINTER.DAT file or modify the one supplied
  3394.           just by using the PtrRec.DEF file.  Someday soon I will make a
  3395.           programme for modifying the PRINTER.DAT file, but for now it will have
  3396.           to be done manually.  I would really appreciate it if you would share
  3397.           with me any new printers you install by sending me your modified
  3398.           PRINTER.DAT file.
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.